package com.kaifamiao.calendar;

import java.util.Calendar;

public class GetCalendarFieldValue {

    public static void main(String[] args) {

        Calendar c = Calendar.getInstance();

        int year = c.get( Calendar.YEAR );
        System.out.println( year );

        // 鬼子那边数月份是从零开始的
        int month = c.get( Calendar.MONTH );
        month = month + 1;
        System.out.println( month );

        int date = c.get( Calendar.DAY_OF_MONTH );
        System.out.println( date );

        int day = c.get( Calendar.DAY_OF_WEEK );
        System.out.println( day );

        System.out.println( c.get( Calendar.HOUR_OF_DAY ) );
        System.out.println( c.get( Calendar.MINUTE ) );
        System.out.println( c.get( Calendar.SECOND ) );
        System.out.println( c.get( Calendar.MILLISECOND ) );

    }

}
